package com.itheima.day08.myTreeSet.test2$.dao;

import com.itheima.day08.myTreeSet.test2$.domain.Student;

import java.util.TreeSet;

public class StudentDao {
    private static TreeSet<Student> treeSet = new TreeSet<>();

    // 存数据
    public boolean addStudent(String id, String name){
        Student stu = new Student();
        stu.setId(id);
        stu.setName(name);
        treeSet.add(stu);
        return true;
    }
    // 取数据
    public TreeSet<Student> getStudent(){
        return treeSet;
    }
}
